package tool.zyk.utils;

import lombok.extern.slf4j.Slf4j;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * @author feite.zyk
 * @time 2024/2/4 13:22
 * @description
 */
@Slf4j
public class LogUtil {
    public static void printErrorLog(Throwable throwable) {
        StringWriter stringWriter = new StringWriter();
        PrintWriter printWriter = new PrintWriter(stringWriter);
        throwable.printStackTrace(printWriter);
        String string = stringWriter.toString();
        log.error("error->\r\n{}", string);
    }
}
